Input radius of a circle and compute the areaΒΆ
Accept the radius of a circle from the user and compute the area.
Sample Output :
r = 1.1
Area = 3.8013271108436504
from math import pi
r = float(input("Input the radius of the circle : "))
print ("The area of the circle with radius " + str(r) + " is: " + str(pi * r**2))
Output:
Input the radius of the circle : 1.1
The area of the circle with radius 1.1 is: 3.8013271108436504